package com.gm.wj.dao;

import com.gm.wj.dto.WorkSubmitDTO;
import com.gm.wj.entity.WorkSubmit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

public interface WorkSubmitDAO extends JpaRepository<WorkSubmit,Integer> {


    @Query(value = "select s.id,s.content as submitContent,s.publish_id as publishId,s.submitter,s.`status`,s.score,p.course,p.name,p.content as workContent,p.publisher from work_submit s left join work_publish p on s.publish_id=p.id",nativeQuery = true)
    List<Map> getList();

}
